from ultralytics import YOLO
 
CFG = r"D:\Desktop\cfg files\02-Improved.pt"
model = YOLO(CFG) 

metrics = model.predict(source = r'D:\Desktop\Display Images\images',
                    save_txt = True,
                    workers = 0,
                    project = r'D:\Desktop\Display Images\Improved-labels',
                    name = 'pred',
                    ) 